package com.leo.foodmaster.admin.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import com.leo.foodmaster.commons.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author Leo
 * @since 2021-06-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_permission")
@ApiModel(value="Permission对象", description="菜单权限表")
public class Permission extends BaseEntity implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "中文名称")
    private String title;

    @ApiModelProperty(value = "父菜单ID")
    private Long parentId;

    @ApiModelProperty(value = "显示顺序")
    private Integer orderNum;

    @ApiModelProperty(value = "路由地址")
    private String path;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "接口路径")
    private String uri;

    @ApiModelProperty(value = "是否为外链：默认为1（不是）0（是）")
    private String isFrame;

    @ApiModelProperty(value = "是否缓存：1（缓存）默认0（不缓存）")
    private String isCache;

    @ApiModelProperty(value = "权限类型（M目录 C菜单 F按钮 A 接口）")
    private String type;

    @ApiModelProperty(value = "菜单状态：默认为0（显示）1（隐藏）")
    private String visible;

    @ApiModelProperty(value = "权限状态：默认为0（正常）1（停用）")
    private String status;

    @ApiModelProperty(value = "请求方法类型（POST/PUT/DELETE/PATCH）")
    private String method;

    @ApiModelProperty(value = "权限标识")
    private String perms;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "子菜单列表")
    @TableField(exist = false)
    private List<Permission> children;

}
